<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>fdk-aac: General Overview of the AAC Decoder Implementation</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">fdk-aac
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="PageDoc"><div class="header">
  <div class="headertitle">
<div class="title">General Overview of the AAC Decoder Implementation </div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p>The main entry point to decode a AAC frame is CAacDecoder_DecodeFrame(). It handles the different transport multiplexes and bitstream formats supported by this implementation. It extracts the AAC_raw_data_blocks from these bitstreams to further process then in the actual decoding stages.</p>
<p>Note: Click on a function of file in the above image to see details about the function. Also note, that this is just an overview of the most important functions and not a complete call graph.</p>
<h2>1 Bitstream deformatter</h2>
<p>The basic bit stream parser function CChannelElement_Read() is called. It uses other subcalls in order to parse and unpack the bitstreams. Note, that this includes huffmann decoding of the coded spectral data. This operation can be computational significant specifically at higher bitrates. Optimization is likely in CBlock_ReadSpectralData().</p>
<p>The bitstream deformatter also includes many bitfield operations. Profiling on the target will determine required optimizations.</p>
<h2>2 Actual decoding to retain the time domain output</h2>
<p>The basic bitstream deformatter function CChannelElement_Decode() for CPE elements and SCE elements are called. Except for the stereo processing (2.1) which is only used for CPE elements, the function calls for CPE or SCE are similar, except that CPE always processes to independent channels while SCE only processes one channel.</p>
<p>Often there is the distinction between long blocks and short blocks. However, computational expensive functions that ususally require optimization are being shared by these two groups,</p>
<h3>2.1 Stereo processing for CPE elements</h3>
<p>CChannelPairElement_Decode() first calles the joint stereo tools in stereo.cpp when required.</p>
<h3>2.2 Scaling of spectral data</h3>
<p>CBlock_ScaleSpectralData().</p>
<h3>2.3 Apply additional coding tools</h3>
<p>ApplyTools() calles the PNS tools in case of MPEG-4 bitstreams, and TNS filtering CTns_Apply() for MPEG-2 and MPEG-4 bitstreams. The function TnsFilterIIR() which is called by CTns_Apply() (2.3.1) might require some optimization.</p>
<h2>3 Frequency-To-Time conversion</h2>
<p>The filterbank is called using CBlock_FrequencyToTime() using the MDCT module from the FDK Tools </p>
</div></div><!-- contents -->
</div><!-- PageDoc -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>
